import java.io.Serializable;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

public class Address implements Serializable {
	private int id;
	private String address1;
	private String address2;
	private String company;
	private String city;
	private String state;
	private String zip;
	
	public Address() {
		
	}

	public String getAddress1() {
		return address1;
	}

	public void setAddress1(String address1) {
		this.address1 = address1;
	}

	public String getAddress2() {
		return address2;
	}

	public void setAddress2(String address2) {
		this.address2 = address2;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCompany() {
		return company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getZip() {
		return zip;
	}

	public void setZip(String zip) {
		this.zip = zip;
	}

	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof Address)) {
			return false;
		}
		Address rhs = (Address) object;
		return new EqualsBuilder().appendSuper(super.equals(object)).append(
				this.address2, rhs.address2).append(this.state, rhs.state)
				.append(this.zip, rhs.zip).append(this.address1, rhs.address1)
				.append(this.city, rhs.city).append(this.id, rhs.id).append(
						this.company, rhs.company).isEquals();
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	/*
	public int hashCode() {
		return new HashCodeBuilder(596616989, 1691498223).appendSuper(
				super.hashCode()).append(this.address2).append(this.state)
				.append(this.zip).append(this.address1).append(this.city)
				.append(this.id).append(this.company).toHashCode();
	}
	*/

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this).append("state", this.state).append(
				"address2", this.address2).append("id", this.id).append(
				"address1", this.address1).append("company", this.company)
				.append("zip", this.zip).append("city", this.city).toString();
	}
}
